home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 235 / Issue 235 - September 2007 - DPCS0907DVD.ISO / Microsoft / Expression Blend / Blend.en.msi / Sparkle.PBook.PhotoBook.xaml.en < prev    next >
Encoding:
Extensible Markup Language  |  2007-02-16  |  8.4 KB  |  123 lines

  1. <Window
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.     xml:lang="en-US"
  5.     xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:PhotoBook="clr-namespace:PhotoBook"
  6.     x:Class="PhotoBook.PhotoBookViewer"
  7.     x:Name="PhotoBook"
  8.     Title="PhotoBook"
  9.     Width="1024" Height="768" BorderBrush="{x:Null}" BorderThickness="0,0,0,0" WindowState="Normal" ResizeMode="CanMinimize" FontSize="11" FontFamily="Tahoma">
  10.  
  11.   <Window.Resources>
  12.     <Style x:Key="MenuButtonStyle" BasedOn="{x:Null}" TargetType="{x:Type Button}">
  13.       <Setter Property="Template">
  14.         <Setter.Value>
  15.           <ControlTemplate TargetType="{x:Type Button}">
  16.             <Grid>
  17.               <Rectangle Opacity="0" Fill="#66FFFFFF" Stroke="{x:Null}" StrokeThickness="0.5" HorizontalAlignment="Stretch" Margin="0,2,2,2" x:Name="rectangle" VerticalAlignment="Stretch"/>
  18.               <Path Fill="{x:Null}" Stretch="Fill" Stroke="#7FFFFFFF" StrokeThickness="1" HorizontalAlignment="Right" Margin="0,4,0.5,4" Width="1" Height="17" Grid.RowSpan="1" Data="M-87.28,4 L-87.28,17"/>
  19.               <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="10,0,10,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" TextElement.Foreground="#FFFFFFFF" RecognizesAccessKey="True"/>
  20.             </Grid>
  21.             <ControlTemplate.Triggers>
  22.               <Trigger Property="IsFocused" Value="True"/>
  23.               <Trigger Property="IsDefaulted" Value="True"/>
  24.               <Trigger Property="IsMouseOver" Value="True">
  25.                 <Setter Property="Opacity" TargetName="rectangle" Value="0.5"/>
  26.               </Trigger>
  27.               <Trigger Property="IsPressed" Value="True">
  28.                 <Setter Property="Opacity" TargetName="rectangle" Value="1"/>
  29.                 <Setter Property="Fill" TargetName="rectangle" Value="#FF000000"/>
  30.               </Trigger>
  31.               <Trigger Property="IsEnabled" Value="False"/>
  32.             </ControlTemplate.Triggers>
  33.           </ControlTemplate>
  34.         </Setter.Value>
  35.       </Setter>
  36.     </Style>
  37.     <Storyboard x:Key="intro">
  38.       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
  39.         <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  40.         <SplineDoubleKeyFrame KeyTime="00:00:02.2000000" Value="0"/>
  41.         <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:02.5000000" Value="1"/>
  42.       </DoubleAnimationUsingKeyFrames>
  43.       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="splashGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
  44.         <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  45.         <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
  46.         <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
  47.         <SplineDoubleKeyFrame KeyTime="00:00:01.9000000" Value="1"/>
  48.         <SplineDoubleKeyFrame KeySpline="0.5,0,0.5,0.5" KeyTime="00:00:02.3000000" Value="0"/>
  49.       </DoubleAnimationUsingKeyFrames>
  50.       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="splashGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  51.         <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.9"/>
  52.         <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
  53.         <SplineDoubleKeyFrame KeyTime="00:00:01.9000000" Value="1"/>
  54.         <SplineDoubleKeyFrame KeySpline="0.5,0,0.5,0.5" KeyTime="00:00:02.3000000" Value="1.1"/>
  55.       </DoubleAnimationUsingKeyFrames>
  56.       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="splashGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
  57.         <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.9"/>
  58.         <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
  59.         <SplineDoubleKeyFrame KeyTime="00:00:01.9000000" Value="1"/>
  60.         <SplineDoubleKeyFrame KeySpline="0.5,0,0.5,0.5" KeyTime="00:00:02.3000000" Value="1.1"/>
  61.       </DoubleAnimationUsingKeyFrames>
  62.       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="photoBook" Storyboard.TargetProperty="(UIElement.Opacity)">
  63.         <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  64.         <SplineDoubleKeyFrame KeyTime="00:00:02.5000000" Value="0"/>
  65.         <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:02.9000000" Value="1"/>
  66.       </DoubleAnimationUsingKeyFrames>
  67.     </Storyboard>
  68.   </Window.Resources>
  69.  
  70.   <Window.Background>
  71.     <LinearGradientBrush EndPoint="0.511,0.991" StartPoint="0.511,0.091">
  72.       <GradientStop Color="#FF222222" Offset="0"/>
  73.       <GradientStop Color="#FFFFFFFF" Offset="1"/>
  74.     </LinearGradientBrush>
  75.   </Window.Background>
  76.  
  77.   <Window.Triggers>
  78.     <EventTrigger RoutedEvent="FrameworkElement.Loaded">
  79.       <BeginStoryboard Storyboard="{StaticResource intro}"/>
  80.     </EventTrigger>
  81.   </Window.Triggers>
  82.   <Grid Focusable="False" x:Name="root">
  83.     <Grid RenderTransformOrigin="0.5,0.5" x:Name="splashGrid" Opacity="0" d:LayoutOverrides="Width, Height" Margin="0,0,0,-1">
  84.       <Grid.RenderTransform>
  85.         <TransformGroup>
  86.           <ScaleTransform ScaleX="1" ScaleY="1"/>
  87.           <SkewTransform AngleX="0" AngleY="0"/>
  88.           <RotateTransform Angle="0"/>
  89.           <TranslateTransform X="0" Y="0"/>
  90.         </TransformGroup>
  91.       </Grid.RenderTransform>
  92.       <Image Visibility="Visible" x:Name="splash" Canvas.Left="288" Canvas.Top="72" Stretch="Fill" Opacity="1" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" Margin="111,0,0,0" VerticalAlignment="Stretch" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" Width="609" Height="550" Source="Assets\splash.png">
  93.         <Image.RenderTransform>
  94.           <TransformGroup>
  95.             <ScaleTransform ScaleX="1" ScaleY="1"/>
  96.             <SkewTransform AngleX="0" AngleY="0"/>
  97.             <RotateTransform Angle="0"/>
  98.             <TranslateTransform X="0" Y="0"/>
  99.           </TransformGroup>
  100.         </Image.RenderTransform>
  101.       </Image>
  102.       <TextBlock Opacity="1" Height="76" FontFamily="Segoe" FontSize="60" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Margin="165,-398,256,0" VerticalAlignment="Center" HorizontalAlignment="Center">
  103.         <Run Foreground="#FF4D4D4D">Photo</Run>
  104.         <Run FontWeight="Normal">Book</Run>
  105.       </TextBlock>
  106.       <TextBlock Opacity="1" Height="33" FontFamily="Segoe" FontSize="16" FontStretch="Normal" FontWeight="Normal" TextWrapping="Wrap" Foreground="#FF8C8C8C" Text="Sample Pack 1" Margin="90,-292,353,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  107.     </Grid>
  108.     <Grid Opacity="1" Margin="30,30,30.5,0" x:Name="grid" VerticalAlignment="Top" Canvas.Left="30" Canvas.Top="30">
  109.       <Image HorizontalAlignment="Right" Margin="0,7,0,0" VerticalAlignment="Top" Width="133" Height="33" Source="Assets\blend.png" Stretch="Fill" x:Name="ExpressionBlendLogo"/>
  110.       <Rectangle Fill="#26FFFFFF" Stroke="{x:Null}" StrokeThickness="0.5" HorizontalAlignment="Stretch" Margin="0,45,0,0" VerticalAlignment="Bottom" Height="21" x:Name="menuBar"/>
  111.       <TextBlock Opacity="1" FontFamily="Segoe" FontSize="48" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="#FFFFFFFF" Margin="-2,-15.14,205.5,5.14">
  112.         <Run Foreground="#FF9C9FA3">Photo</Run>
  113.         <Run FontWeight="Normal">Book</Run>
  114.         <Run FontSize="14" FontWeight="Normal" Foreground="#FF9C9FA3">Sample Pack 1</Run>
  115.       </TextBlock>
  116.       <StackPanel HorizontalAlignment="Stretch" Margin="2,0,0,0" VerticalAlignment="Bottom" Height="21" Orientation="Horizontal" x:Name="stackMenu">
  117.         <Button Style="{DynamicResource MenuButtonStyle}" Content="_Exit" Click="OnExit"/>
  118.       </StackPanel>
  119.     </Grid>
  120.     <Canvas Margin="0,0,0.5,0" x:Name="table" Canvas.Left="0" Canvas.Top="0"/>
  121.     <PhotoBook:BookViewer Opacity="1" HorizontalAlignment="Center" Margin="100,80,100,20" x:Name="photoBook" VerticalAlignment="Center" Width="Auto" Height="Auto" BookPath="Sample_Photos"/>
  122.   </Grid>
  123. </Window>